package com.copc.common.constants;


/**
 * 系统异常枚举类
 */
public enum SystemStatusEnum {
    SUCCESS("0000", "成功"),
    SUCCESS_ASYNC("0000O", "成功 (异步)"),
    PARAM_ERROR("40000", "参数异常"),
    DUPLICATE_NUMBER_ERROR("40001", "交易流水号重复"),
    SIGNATURE_ERROR("40002", "签名异常"),
    NOT_FOUND("40004", "资源不存在"),
    FAILURE("50000", "系统异常"),
    UNKNOWN_ERROR("9999","未知异常"),
    DOUBLE_copc("003","重复投保"),
    TOKEN_EXPIRED("10001", "TOKEN过期"),
    UN_RISK("10002", "请先调用风控校验接口"),
    copc_RISK("600001", "投保限制异常"),
    PICUS_CHECK_RESULT("600002", "派克斯校验异常");

    private final String code;

    private final String message;

    SystemStatusEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }

    //获取状态码
    public String code() {
        return code;
    }

    //获取信息
    public String message() {
        return message;
    }

    @Override
    public String toString() {
        return String.valueOf(this.code);
    }
}
